<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\xwam\controller\sms;

/**
 * Description of SmsVerifyCodeModel
 *
 * @author SoChishun
 */
class SmsVerifyCodeModel {
    const TABLE='sms_verify_code';
    public function sendVerifyCode($mobile){
        $smsServerModel=new SmsServerModel();
        $smsServerModel->sendVerifyCode($mobile);
    }
    
    public function checkVerifyCode($mobile,$code){
        return db(self::TABLE)->where([['mobile','=',$mobile],['verify_code','=',$code]])->count()>0;
    }
}
